package com.liuxinlong.enums;

/**
 * 保密等级枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-03-03
 */
public enum SecurityLevelEnum {
    A(1, "A"), B(2, "B");

    private int value;

    private String name;

    SecurityLevelEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        SecurityLevelEnum arrObj[] = SecurityLevelEnum.values();
        for (SecurityLevelEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return "";
    }

}
